﻿using MongoDB.Bson.Serialization.Attributes;

namespace QPEngine
{
    /// <summary>
    /// 用户（玩家）
    /// </summary>
    [BsonIgnoreExtraElements]
    public sealed class Player : Entity
    {
        [BsonIgnore]
        public Session session;
        public PlayerInfo Info = new PlayerInfo();
        public override void Dispose()
		{
			if (this.Id == 0)
			{
				return;
			}

			base.Dispose();
		}
	}

    public sealed class PlayerState
    {
        /// <summary>
        /// 是否再游戏？
        /// </summary>
        public bool playing = false;
        /// <summary>
        /// 房间ID
        /// </summary>
        public int roomID = -1;
        /// <summary>
        /// 桌子ID
        /// </summary>
        public int deskID = -1;
        /// <summary>
        /// 座位号
        /// </summary>
        public int seatID = -1;
    }
}